package com.econ.powercloud.ems.common.enums;

/**
 * @Author : zjf
 * @Description : 数据导出类型
 * @Date : 2023/6/1 19:01
 * @Modified by : zjf
 */
public enum ExportDataType implements EnumMethod{

    DEVICE_DIT_HIS_DATA(1,"设备点号历史数据"),
    ;

    private Integer code;
    private String desc;

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getDesc() {
        return desc;
    }

    ExportDataType(int code, String desc){
        this.code=code;
        this.desc=desc;
    }

    public static ExportDataType fromCode(int code){
        for(ExportDataType type: ExportDataType.values()){
            if(type.getCode() == code){
                return type;
            }
        }
        return null;
    }

}
